package com.ruoyi.doorcontrol.service.impl;

import java.util.List;
import com.ruoyi.common.utils.DateUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.ruoyi.doorcontrol.mapper.ThFaceRecordsMapper;
import com.ruoyi.doorcontrol.domain.ThFaceRecords;
import com.ruoyi.doorcontrol.service.IThFaceRecordsService;

/**
 * 门禁刷脸记录Service业务层处理
 * 
 * @author zhang
 * @date 2024-07-20
 */
@Service
public class ThFaceRecordsServiceImpl implements IThFaceRecordsService 
{
    @Autowired
    private ThFaceRecordsMapper thFaceRecordsMapper;

    /**
     * 查询门禁刷脸记录
     * 
     * @param id 门禁刷脸记录主键
     * @return 门禁刷脸记录
     */
    @Override
    public ThFaceRecords selectThFaceRecordsById(Long id)
    {
        return thFaceRecordsMapper.selectThFaceRecordsById(id);
    }

    /**
     * 查询门禁刷脸记录列表
     * 
     * @param thFaceRecords 门禁刷脸记录
     * @return 门禁刷脸记录
     */
    @Override
    public List<ThFaceRecords> selectThFaceRecordsList(ThFaceRecords thFaceRecords)
    {
        return thFaceRecordsMapper.selectThFaceRecordsList(thFaceRecords);
    }

    /**
     * 新增门禁刷脸记录
     * 
     * @param thFaceRecords 门禁刷脸记录
     * @return 结果
     */
    @Override
    public int insertThFaceRecords(ThFaceRecords thFaceRecords)
    {
        thFaceRecords.setCreateTime(DateUtils.getNowDate());
        return thFaceRecordsMapper.insertThFaceRecords(thFaceRecords);
    }

    /**
     * 修改门禁刷脸记录
     * 
     * @param thFaceRecords 门禁刷脸记录
     * @return 结果
     */
    @Override
    public int updateThFaceRecords(ThFaceRecords thFaceRecords)
    {
        return thFaceRecordsMapper.updateThFaceRecords(thFaceRecords);
    }

    /**
     * 批量删除门禁刷脸记录
     * 
     * @param ids 需要删除的门禁刷脸记录主键
     * @return 结果
     */
    @Override
    public int deleteThFaceRecordsByIds(Long[] ids)
    {
        return thFaceRecordsMapper.deleteThFaceRecordsByIds(ids);
    }

    /**
     * 删除门禁刷脸记录信息
     * 
     * @param id 门禁刷脸记录主键
     * @return 结果
     */
    @Override
    public int deleteThFaceRecordsById(Long id)
    {
        return thFaceRecordsMapper.deleteThFaceRecordsById(id);
    }

    @Override
    public List<ThFaceRecords> selectYiVisitControlList2(ThFaceRecords thFaceRecords) {
        return thFaceRecordsMapper.selectYiVisitControlList2(thFaceRecords);
    }

    @Override
    public List<ThFaceRecords> selectYiVisitControlListByyg(ThFaceRecords thFaceRecords) {
        return thFaceRecordsMapper.selectYiVisitControlListByyg(thFaceRecords);
    }
}
